<?php

declare(strict_types=1);

namespace App\Model\PssModel;

use App\Model\BaseModel\BasePssModel;
use Service\AppService\IdService;
use App\Service\Code\Normal;

/**
 * 添加结算中间表数据
 */
class OrderSettlementMiddle extends BasePssModel
{
    public $table = 'order_settlement_middle';
    
    /**
     * 添加结算日志
     * @param int $bid
     * @param string $event_id
     * @param int $order_type
     */
    public function addLog(int $bid,string $event_id,int $order_type) 
    {
        $this->add([
            'id'            => IdService::instance()->getOtherID(),
            'bid'           => $bid,
            'event_id'      => $event_id,
            'order_type'    => $order_type,
            'cd'            => time()
        ]);
        return Normal::returnCode(Normal::SUC,"添加成功");
    }
}
